package twidledee.client;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class User implements Serializable{
	
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private String twitterId;
	@Persistent
	private String twitterPassword;
	@Persistent
	private String userName;
	@Persistent
	private String address;
	@Persistent
	private String postalCode;
	
	public User(){}
	
	public User(String userName, String password, String address, String postalCode){
		this.setUserName(userName);
		this.setTwitterPassword(password);
		this.setAddress(address);
		this.setPostalCode(postalCode);
		
		this.setTwitterId(userName);
	}

	public void setTwitterId(String twitterId) {
		this.twitterId = twitterId;
	}

	public String getTwitterId() {
		return twitterId;
	}

	public void setTwitterPassword(String twitterPassword) {
		this.twitterPassword = twitterPassword;
	}

	public String getTwitterPassword() {
		return twitterPassword;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserName() {
		return userName;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAddress() {
		return address;
	}

	public void setPostalCode(String postalCode) {
		this.postalCode = postalCode;
	}

	public String getPostalCode() {
		return postalCode;
	}
}
